home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / VD08BIN.ZIP / usr / include / pm / presentationspace.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-13  |  1.4 KB  |  70 lines

  1. #ifndef _PRESENTATIONSPACE_H_
  2. #define _PRESENTATIONSPACE_H_
  3.  
  4. #ifndef _OS2EMX_H
  5. #define INCL_PM
  6. #include <objc/os2.h>
  7. #endif
  8.  
  9. #include <objc/Object.h>
  10.  
  11. #ifndef _ARCHIVING_H_
  12. #include <pm/Archiving.h>
  13. #endif
  14.  
  15. @interface PresentationSpace : Object <Archiving>
  16. {
  17.   HPS   hps;
  18.   float spacing;
  19.   LONG  xResolution;
  20.   LONG  yResolution;
  21.   LONG  textHeight;
  22. }
  23.  
  24. - init;
  25.  
  26. - setHPS: (HPS) aHPS;
  27. - (HPS) hps;
  28.  
  29. // form definition
  30. - (LONG) widthInPels;
  31. - (LONG) widthInMm;
  32. - (LONG) heightInPels;
  33. - (LONG) heightInMm;
  34.  
  35. - (LONG) xResolution;
  36. - (LONG) yResolution;
  37.  
  38. - (LONG) textHeight;
  39.  
  40. // font settings
  41. - setSpacing: (float) ratio;
  42. - (float) spacing;
  43.  
  44. - setFont: (char *) fontName;
  45. - setFont: (char *) fontName at: (LONG) pointSize;
  46. - setFontSize: (LONG) pointSize;
  47.  
  48. // methods for drawing characters & strings
  49. - (LONG) stringWidth: (char *) aString;
  50. - (LONG) stringBoxWidth: (char *) stringBox;
  51. - (LONG) stringBoxHeight: (char *) stringBox;
  52.  
  53. - string: (char *) aString;
  54. - string: (char *) aString at: (LONG) x : (LONG) y;
  55. - stringBox: (char *) stringBox;
  56. - stringBox: (char *) stringBox at: (LONG) x : (LONG) y;
  57.  
  58. // methods for putting graphics to HPS
  59. - lineTo: (LONG) x : (LONG) y;
  60. - lineFrom: (LONG) x0 : (LONG) y0 to: (LONG) x : (LONG) y;
  61.  
  62. /* -------------------------- Archiving --------------------------- */
  63. -read: (TypedStream *) aStream;
  64. -write: (TypedStream *) aStream;
  65. -awake;
  66.  
  67. @end
  68.  
  69. #endif
  70.